<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
  <title id="fr163961">gp_segment_configuration</title>
  <body>
    <p>The <codeph>gp_segment_configuration</codeph> table contains information about mirroring and
      segment instance configuration.</p>
    <table id="fr163962">
      <title>pg_catalog.gp_segment_configuration</title>
      <tgroup cols="4">
        <colspec colnum="1" colname="col1" colwidth="131pt"/>
        <colspec colnum="2" colname="col2" colwidth="97pt"/>
        <colspec colnum="3" colname="col3" colwidth="82pt"/>
        <colspec colnum="4" colname="col4" colwidth="138pt"/>
        <thead>
          <row>
            <entry colname="col1">column</entry>
            <entry colname="col2">type</entry>
            <entry colname="col3">references</entry>
            <entry colname="col4">description</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry colname="col1">
              <codeph id="fr163981">dbid</codeph>
            </entry>
            <entry colname="col2">smallint</entry>
            <entry colname="col3"/>
            <entry colname="col4">Unique identifier of a segment (or master) instance.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph id="fr163990">content</codeph>
            </entry>
            <entry colname="col2">smallint</entry>
            <entry colname="col3"/>
            <entry colname="col4">The content identifier for a segment instance. A primary segment
              instance and its corresponding mirror will always have the same content
                identifier.<p>For a segment the value is from 0 to <i>N</i>-1, where <i>N</i> is the
                number of primary segments in the system.</p><p>For the master, the value is always
                -1.</p></entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>role</codeph>
            </entry>
            <entry colname="col2">char</entry>
            <entry colname="col3"/>
            <entry colname="col4">The role that a segment is currently running as. Values are
                <codeph>p</codeph> (primary) or <codeph>m</codeph>(mirror). </entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>preferred_role</codeph>
            </entry>
            <entry colname="col2">char</entry>
            <entry colname="col3"/>
            <entry colname="col4">The role that a segment was originally assigned at initialization
              time. Values are <codeph>p</codeph> (primary) or <codeph>m</codeph> (mirror).</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>mode</codeph>
            </entry>
            <entry colname="col2">char</entry>
            <entry colname="col3"/>
            <entry colname="col4">The synchronization status of a segment instance with its mirror
              copy. Values are <codeph>s</codeph> (Synchronized) or <codeph>n</codeph> (Not In Sync).
<note>This column always shows <codeph>n</codeph> for the master
                segment and <codeph>s</codeph> for the standby master segment, but these values do
                not describe the synchronization state for the master segment. Use <xref
                  href="gp_stat_replication.xml#topic1"/> to determine the synchronization state
                between the master and standby master.</note></entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>status</codeph>
            </entry>
            <entry colname="col2">char</entry>
            <entry colname="col3"/>
            <entry colname="col4">The fault status of a segment instance. Values are
                <codeph>u</codeph> (up) or <codeph>d</codeph> (down).</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>port</codeph>
            </entry>
            <entry colname="col2">integer</entry>
            <entry colname="col3"/>
            <entry colname="col4">The TCP port the database server listener process is
              using.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>hostname</codeph>
            </entry>
            <entry colname="col2">text</entry>
            <entry colname="col3"/>
            <entry colname="col4">The hostname of a segment host.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>address</codeph>
            </entry>
            <entry colname="col2">text</entry>
            <entry colname="col3"/>
            <entry colname="col4">The hostname used to access a particular segment instance on a
              segment host. This value may be the same as <codeph>hostname</codeph> on systems that
              do not have per-interface hostnames configured.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>datadir</codeph>
            </entry>
            <entry colname="col2">text</entry>
            <entry colname="col3"/>
            <entry colname="col4">Segment instance data directory.</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
  </body>
</topic>
